When resetting the greeter proxy, it's destroyed and then recreated
again.
This destroy/recreate thing doesn't give any info to GDM and the greeter
interface destroyed has the same state as the newly created one.
Each time get_greeter_sync is called when greeter is destroyed makes GDM
create a new connection which stores in a list. This means that for each
reset a new unnecessary connection is created and stored.
GDM was leaking some objects which combined with this excessive connection
creation was causing a fd leak on each reset.
To make better use of resources and avoid problems, use ensure instead
of reset greeter proxy.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3749>
this._showPrompt();
}
- _resetGreeterProxy() {
+ _ensureGreeterProxy() {
if (GLib.getenv('GDM_GREETER_TEST') !== '1') {
if (this._greeter)
- this._greeter.run_dispose();
+ return;
this._greeter = this._gdmClient.get_greeter_sync(null);
}
_onReset(authPrompt, beginRequest) {
- this._resetGreeterProxy();
+ this._ensureGreeterProxy();
this._sessionMenuButton.updateSensitivity(true);
const previousUser = this._user;